(in-package :logo)

(setf *debug-tk* nil)

(defparameter *logo-display* nil)

(defmacro with-logo (&body body)
  (let ((scrolled-canvas (gensym "scrolled-canvas")))
    `(with-ltk
      (let* ((,scrolled-canvas (make-instance 'scrolled-canvas))
	     (*logo-display* (canvas ,scrolled-canvas))
	     (*turtle* (make-turtle)))
	(pack ,scrolled-canvas :expand 1 :fill :both)
	(scrollregion *logo-display* 0 0 800 800)
	(wm-title *tk* "LTk Logo")
	(minsize *tk* 800 600)
	,@body))))